#sidebar {
  flex: 0 1 100%;
  max-height: 100%;
  overflow: hidden;
  .sidebar-wrap {
    flex: 1 1 100%;
    flex-wrap: nowrap;
    .gutter.gutter-vertical {
      &:after {
        height: 10px;
        top: -5px;
      }
    }
  }
  .sidebar-heading {
    display: flex;
    align-items: center;
    background: rgba($theme-base, 0.05);
    box-shadow: 0 1px 2px rgba(black, 0.2);
    padding: $gutter-h $gutter-h $gutter-h $gutter-w;
    height: $tab-height;
    font-size: 14px;
    line-height: 28px;
    .status {
      .material-icons {
        font-size: 11px;
        margin-right: 0.25rem;
      }
      &.connected {
        .material-icons {
          color: $brand-success;
        }
      }
    }
  }
  .tab-content {
    flex: 1 1 100%;
    max-width: 100%;
    overflow: hidden;
    .tab-pane {
      display: none;
      flex-direction: column;
      flex-grow: 1;
      height: 100%;
      overflow: hidden;
      &.active {
        display: flex;
      }
      .fixed {
        padding: 0 ($gutter-h * 1.25);
      }
    }
  }

  // Empty
  // ---------------------------------
  .empty {
    padding: $gutter-w;
    color: $text;
    font-size: 90%;
  }

  // Sidebar Header
  // ---------------------------------
  .data-select-wrap {
    display: flex;
    align-items: center;
    height: $input-height;
    min-height: $input-height;
    padding: 0 $gutter-h 0 0;
    margin-top: $gutter-w;
    margin-bottom: $gutter-h;
    background: rgba($theme-base, 0.08);
    transition: background 0.15s ease-in-out;
    border-radius: 4px;
    cursor: pointer;
    &:hover {
      background: rgba($theme-base, 0.1);
    }
    select {
      color: $text-dark;
      padding-right: 1.5rem;
      cursor: pointer;
    }
  }
  .database-select {
    display: block;
    font-size: 100%;
    margin: 0;
    width: 100%;
    border: 0;
    .selectise-trigger {
      color: $db-select-text;
      border-radius: $input-radius;
      height: $input-height * 1.1;
      &::after {
        border-color: $db-select-text transparent transparent transparent;
      }
    }
    &:focus {
      outline: 0;
    }
  }

  // Search
  // ---------------------------------
  .filter {
    position: relative;
    margin-bottom: $gutter-w;
    .filter-wrap {
      position: relative;
      display: flex;
      align-items: center;
    }
    input {
      padding-right: 26px;
    }
    .clear {
      position: absolute;
      right: 0;
      font-size: 14px;
      width: 26px;
      padding: 0 $gutter-h;
      color: rgba($theme-base, 0.5);
      cursor: pointer;
      &:hover {
        color: $text-dark;
      }
    }
  }
}
.table-list {
  flex-grow: 1;
}

.badge {
  text-transform: lowercase;
}

// List Group
// ------------------------------
.list-heading {
  $list-heading-height:    1.8rem;

  display: flex;
  align-items: center;
  height: $list-heading-height;
  padding: 0 $gutter-w;
  padding-right: $gutter-h;
  background: rgba($theme-base, 0.06);
  .sub {
    line-height: $list-heading-height;
    div {
      padding-top: 1px;
      color: $text-dark;
    }
    span {
      font-weight: normal;
      color: $text-light;
    }
  }
  .actions {
    a {
      margin: 0 ($gutter-h * 0.5);
      margin-right: 0;
      padding: 0;
    }
    .material-icons {
      font-size: 16px;
    }
  }
}
.list-body {
  flex: 1 1 auto;
  height: 0;
  max-height: -webkit-fill-available;
  padding: $gutter-h 0;
  overflow: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch!important;
}
.list-group {
  flex: 1 1 100%;
  &:hover{
    .list-heading .actions {
      visibility: visible;
    }
  }
  .list-heading .actions {
    display: flex;
    align-items: center;
    visibility: hidden;
  }
  .btn-wrap {
    padding: $gutter-w;
  }
  a, .sub-item {
    display: flex;
    align-items: center;
    flex: 0 1 100%;
  }
  .list-item-btn {
    color: rgba($theme-base, 0.77);
    padding: ($gutter-h * 0.8);
    padding-left: $gutter-w;
    line-height: 1.4;
    width: -webkit-fill-available;
    &:hover, &:focus {
      background: rgba($theme-base, 0.03);
      .actions {
        display: flex;
        .btn-fab {
          &.launch {
            display: inline-flex;
          }
        }
      }
    }
    &.open {
      background: rgba($theme-base, 0.03);
      .open-close {
        transform: rotate(90deg);
      }
    }
    .item-text {
      font-size: 0.95rem;
    }
    .badge {
      display: inline-flex;
      direction: rtl;
      max-width: 50%;
      overflow: hidden;
      font-size: 0.8rem;
      span {
        @extend .truncate;
      }
    }
    .actions {
      display: none;
      align-items: center;
      &.pinned {
        display: inline-flex;
      }
      .btn-fab {
        &:hover {
          i {
            color: $theme-base;
          }
        }
        &.launch {
          display: none;
        }
        &.unpin {
          display: none;
        }
        &.pinned {
          display: inline-flex;
          i {
            color: $theme-primary;
          }
        }
      }
      i {
        font-size: 14px;
        line-height: 1.4;
        color: rgba($theme-base, 0.37);
        transition: color 0.15s ease-in-out;
      }
    }
  }
  .sub-items {
    display: flex;
    flex-direction: column;
    color: $text;
    padding: ($gutter-h * 0.5) 0;
    .title {
      flex-grow: 1;
      font-size: 90%;
    }
  }
  .sub-item {
    color: $text;
    padding: ($gutter-h * 0.5);
    padding-right: $gutter-w;
    padding-left: $gutter-w + ($sidebar-icon-w * 1.35);
  }
  .btn-fab {
    min-width: 18px;
    width: 18px;
    height: 18px;
    margin-right: $gutter-h * 0.5;
    transition: color 0.2 ease-in-out;
    &:hover {
      color: $text-dark;
      background: transparent;
    }
    .material-icons {
      color: rgba($theme-base, 0.37);
      font-size: 18px;
    }
  }
  .item-icon {
    width: $sidebar-icon-w;
    min-width: $sidebar-icon-w;
    transition: transform 0.15s ease-in;
  }
  .badge-info {
    background: $brand-info;
  }

  // Collapse
  // ---------------------------------
  .collapse {
    display: none;
    &.show {
      display: flex;
    }
  }
}
